<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>placeholder属性和require属性</title>
</head>
<body>
<form action="#" method="get">
  请输入邮政编码：<input type="text" name="code" pattern="[0-9]{6}" placeholder="请输入6位数的邮政编码">
    请输入姓名：<input type="text" name="user_name" required="required">
    <input type="submit" value="提交">
</form>
</body>
</html>